/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package webservice;

import control.TransactionStateControl;
import VO.TransactionResult;
import java.util.List;
import javax.jws.Oneway;
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.ejb.Stateless;

/**
 *
 * @author julianDavidPG
 */
@WebService(serviceName = "TransactionResultWS")
@Stateless
public class TransactionResultWS {

    /**
     * Web service operation
     */
    @WebMethod(operationName = "TransactionResultByFile")
    public List<TransactionResult> TransactionResultByFile(@WebParam(name = "fileId") final String fileId) {
        TransactionStateControl control = new TransactionStateControl();
        return control.getTransactionResultByEstablishment(fileId);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "startRevision")
    @Oneway
    public void startRevision(@WebParam(name = "fileId") final String fileId) {
        TransactionStateControl control = new TransactionStateControl();
        control.startRevision(fileId);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "insert")
    @Oneway
    public void insert() {
        TransactionStateControl control = new TransactionStateControl();
        System.out.println("insertion: "+control.insert()); 
    }
}
